import {useRoutes} from "react-router-dom";
import Layout from '@/common/layout'
import Home from '@/pages/home'
import About from '@/pages/about'

const router = [
  {
    path: '/',
    element: (<Layout/>),
    children:[
      {
        path: '',
        element: (<Home/>)
      },
      {
        path: '/about',
        element: (<About/>)
      },
    ]
  }
]

const RouterView = () => {
  return useRoutes(router)
}
export default RouterView
